import axios from '../utils/config';

//获取订单列表
export const getOrderApi = order_id => axios.post('/order/get_order')

//删除订单
export const delOrderApi = order_id => axios.get('/order/del_order', { params: { order_id:order_id } })

//获取vip产品
export const getProductApi = () => axios.get('/product/get_product')

//生成预支付订单
export const getPreorderApi = (product_id, quantity = 1) => axios.post('/order/pre_order',
  {
  product_id: product_id,
  quantity: quantity
  })

//获取支付二维码URL
export const getPayUrlApi = order_id => axios.post("/pay/payment", {
  appid: "wxed58e834201d0894",
  mch_id: 1568650321,
  order_id: order_id
})

//查询支付结果
export const checkPayStateApi = order_id => axios.get("/order/query_order_status",{params:{order_id:order_id}})

